package vfs.obj.association.impl;


import java.sql.Connection;
import vfs.except.VFSException;
import vfs.filter.VFSFilter;
import vfs.obj.association.VFSNodeToParent;
import vfs.obj.entity.VFSNode;
import vfs.persist.association.VFSNodeToParentManager;
import vfs.persist.association.impl.VFSNodeToParentManagerImpl;
import java.util.Iterator;

/**
 *
 * @author Matthew Eavenson <durandal@uga.edu>
 */
public class VFSNodeToParentImpl implements VFSNodeToParent{
    
    private VFSNodeToParentManager manager;
    
    public VFSNodeToParentImpl(Connection conn){
        manager = new VFSNodeToParentManagerImpl(conn);
    }
    
//    public VFSNodeToParentImpl(VFSEntityFactory eFactory){
//        manager = new VFSNodeToParentManagerImpl(eFactory);
//    }
    
    @Override
    public Iterator<VFSNode> getChildren(VFSNode parent, VFSFilter filter) throws VFSException{
        return manager.getChildren(parent, filter);
    }
    
    @Override
    public VFSNode getParent(VFSNode node) throws VFSException{
        return manager.getParent(node);
    }
    
    @Override
    public void setParent(VFSNode node, VFSNode parent) throws VFSException{
        manager.setParent(node, parent);
    }
    
}
